package com.eduhzy.ttw.clazz.mvp.model.entity;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * @author xubo
 * @date 2018/12/4 10:32
 */
public class HomeData implements Parcelable,Cloneable {
    @Override
    public Object clone() throws CloneNotSupportedException {
        return super.clone();
    }

    /**
     * classId : 126
     * className : 心学班
     * endTime : 1544371200000
     * improvingScore : 0
     * praiseScore : 35
     * startTime : 1543766400000
     * userCount : 7
     */
    private int type;
    private int classId;
    private String className;
    private long endTime;
    private int improvingScore;
    private int praiseScore;
    private long startTime;
    private int userCount;
    private int classAdviser;

    public int getClassAdviser() {
        return classAdviser;
    }

    public void setClassAdviser(int classAdviser) {
        this.classAdviser = classAdviser;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public int getClassId() {
        return classId;
    }

    public void setClassId(int classId) {
        this.classId = classId;
    }

    public String getClassName() {
        return className;
    }

    public void setClassName(String className) {
        this.className = className;
    }

    public long getEndTime() {
        return endTime;
    }

    public void setEndTime(long endTime) {
        this.endTime = endTime;
    }

    public int getImprovingScore() {
        return improvingScore;
    }

    public void setImprovingScore(int improvingScore) {
        this.improvingScore = improvingScore;
    }

    public int getPraiseScore() {
        return praiseScore;
    }

    public void setPraiseScore(int praiseScore) {
        this.praiseScore = praiseScore;
    }

    public long getStartTime() {
        return startTime;
    }

    public void setStartTime(long startTime) {
        this.startTime = startTime;
    }

    public int getUserCount() {
        return userCount;
    }

    public void setUserCount(int userCount) {
        this.userCount = userCount;
    }

    public HomeData() {
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(this.type);
        dest.writeInt(this.classId);
        dest.writeString(this.className);
        dest.writeLong(this.endTime);
        dest.writeInt(this.improvingScore);
        dest.writeInt(this.praiseScore);
        dest.writeLong(this.startTime);
        dest.writeInt(this.userCount);
        dest.writeInt(this.classAdviser);
    }

    protected HomeData(Parcel in) {
        this.type = in.readInt();
        this.classId = in.readInt();
        this.className = in.readString();
        this.endTime = in.readLong();
        this.improvingScore = in.readInt();
        this.praiseScore = in.readInt();
        this.startTime = in.readLong();
        this.userCount = in.readInt();
        this.classAdviser = in.readInt();
    }

    public static final Creator<HomeData> CREATOR = new Creator<HomeData>() {
        @Override
        public HomeData createFromParcel(Parcel source) {
            return new HomeData(source);
        }

        @Override
        public HomeData[] newArray(int size) {
            return new HomeData[size];
        }
    };
}
